import gevent
from gevent import monkey
import time
import random

monkey.patch_all()

def c_work(c_name):
    for i in range(10):
        print(c_name, i)
        time.sleep(random.random())

gevent.joinall([
    gevent.spawn(c_work, "work1"),
    gevent.spawn(c_work, "work2")
])




